import { BaseService, Service, Permission } from '@/cool';

@Service('crm/home')
export default class extends BaseService {
	// 今日数据
	@Permission('todayInfo')
	async todayInfo(params) {
		return this.request({
			url: '/todayInfo',
			params: {
				...params
			}
		});
	}
	// 订单相关
	@Permission('orderInfo')
	async orderInfo(params) {
		return this.request({
			url: '/orderInfo',
			params: {
				...params
			}
		});
	}
	// 实时数据折线
	@Permission('chartInfo')
	async chartInfo(params) {
		return this.request({
			url: '/chartInfo',
			params: {
				...params
			}
		});
	}
	// 用户出单
	@Permission('userRank')
	async userRank(params) {
		return this.request({
			url: '/userRank',
			params: {
				...params
			}
		});
	}
}
